package com.furongji.education.domain.vo;

import com.furongji.common.enums.CommentTargetTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
public class CommentVo {

    @Schema(description = "评论ID")
    private String id;

    @Schema(description = "评论用户ID")
    private String userId;

    @Schema(description = "用户昵称")
    private String username;

    @Schema(description = "用户头像")
    private String avatar;

    @Schema(description = "被评论对象ID（课程ID或文章ID）")
    private String targetId;

    @Schema(description = "被评论对象类型，course/article等")
    private CommentTargetTypeEnum targetType;

    @Schema(description = "评论内容")
    private String content;

    @Schema(description = "父评论ID，0为主评论")
    private String parentId;

    @Schema(description = "点赞数")
    private Integer likeCount;

    @Schema(description = "回复数")
    private Integer replyCount;

    @Schema(description = "创建时间")
    private LocalDateTime gmtCreate;

    // 新增
    @Schema(description = "当前用户是否点赞")
    private Boolean isLike;
    // 新增
    @Schema(description = "子评论")
    private List<CommentVo> children;
}
